# Contributor: Aleks Bunin <alpinelinux@compuix.com>
# Maintainer: Aleks Bunin <alpinelinux@compuix.com>
pkgname=antibody
pkgver=6.1.0
pkgrel=0
pkgdesc="The fastest zsh shell plugin manager."
url="https://github.com/getantibody/antibody"
arch="all !mips !mips64"
license="MIT"
depends="git zsh"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/getantibody/antibody/archive/v$pkgver.tar.gz"
builddir="$srcdir/go/src/github.com/getantibody/antibody"

prepare() {
	default_prepare
	mkdir -p "$srcdir/go/src/github.com/getantibody"
	mv "$srcdir/$pkgname-$pkgver" "$builddir"
}

build() {
	export GOPATH="$srcdir/go"
	go build -o antibody -ldflags  "-X main.version=$pkgver" -trimpath
}

check() {
	go test -v -cover ./...
}

package() {
	install -sD -m 755 antibody "$pkgdir"/usr/bin/antibody
}

cleanup_srcdir() {
	go clean -modcache
	default_cleanup_srcdir
}

sha512sums="83f826a9a6cc789f74cf8ed996ae8dc2f953729fa47510db815988a43ad174913042769b20a120c58f5173108e32e2aa64dbb03ffac97ca2f1fff0c05ad2ae45  antibody-6.1.0.tar.gz"
